#include "motor_ctrl.h"


void up_vn_wn_pwm(uint16 duty)
{
	CCU6->CC60SR.reg = duty;
	CCU6->CC61SR.reg = 1200;
	CCU6->CC62SR.reg = 1200;
	CCU6_T12_Str_En();
	BDRV_Set_Bridge(Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM);
}

void up_vp_wn_pwm(uint16 duty)
{
	CCU6->CC60SR.reg = duty;
	CCU6->CC61SR.reg = duty;
	CCU6->CC62SR.reg = 1200;
	BDRV_Set_Bridge(Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM);
	CCU6_T12_Str_En();
}


void un_vp_wn_pwm(uint16 duty)
{
	CCU6->CC60SR.reg = 1200;
	CCU6->CC61SR.reg = duty;
	CCU6->CC62SR.reg = 1200;
	BDRV_Set_Bridge(Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM);
	CCU6_T12_Str_En();
	
}

void un_up_wp_pwm(uint16 duty)
{
	CCU6->CC60SR.reg = 1200;
	CCU6->CC61SR.reg = duty;
	CCU6->CC62SR.reg = duty;
	BDRV_Set_Bridge(Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM);
	CCU6_T12_Str_En();
}

void un_vn_wp_pwm(uint16 duty)
{
	CCU6->CC60SR.reg = 1200;
	CCU6->CC61SR.reg = 1200;
	CCU6->CC62SR.reg = duty;
	BDRV_Set_Bridge(Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM);
	CCU6_T12_Str_En();
}

void up_vn_wp_pwm(uint16 duty)
{
	CCU6->CC60SR.reg = duty;
	CCU6->CC61SR.reg = 1200;
	CCU6->CC62SR.reg = duty;
	BDRV_Set_Bridge(Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM, Ch_PWM);
	CCU6_T12_Str_En();

}
